import { defineStore } from "pinia";

const startDate = new Date()
const endDate = new Date()
endDate.setDate(startDate.getDate() + 1)
import { getAssetURL } from "@/utils/load_assets.js"
const useMainStore = defineStore("main", {
  state: () => ({
    token: "",
    userInfo:{
      avatar: getAssetURL('home/avatar.png'),
      name: '登录',
      service: ''
    },
    startDate: startDate,
    endDate: endDate,
    dataCounts:{//数据统计
      kabaw_count:'',
      order_count:'',
      money:'',
      exchange_count:'',//	兑换数量
      order_count:'',//分销订单
      member_count:''
    },
    isLoading: false
  }),
})

export default useMainStore
